﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Activity.aspx.cs" Inherits="Bingosoft.Swimming.WebServer.Activity" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>在线报名</title>
    <style type="text/css">
        body{ padding:0; margin:0; }
        .top{ background-color:#088bc4; color:White; font-weight:bold; text-align:right; line-height:40px; padding-right:10px; }
        .content{ width:1000px; margin:0 auto; }
        .activityContent{ margin:10px; font-size:16px; }
        .activityContent span{ font-weight:bold; }
        .center{ text-align:center; }
    </style>
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="top">您好：<asp:Label ID="UserName" runat="server"></asp:Label></div>
    <asp:Repeater runat="server" ID="rptActivity" 
            onitemcommand="rptActivity_ItemCommand" 
            onitemdatabound="rptActivity_ItemDataBound">
        <HeaderTemplate>
        <div class="content">
     <table border="0" cellpadding="0" cellspacing="0">
        <tr>
        </HeaderTemplate>
        <FooterTemplate>
        </tr>
    </table>
        </div>
        </FooterTemplate>
        <ItemTemplate>
        <td valign="top" width="500" style="background-color:#<%# Container.ItemIndex %2==0 ? "DBF0D4" : "D4E6F0" %>">
            <div class="activityContent">
            <h1><%#Eval("Title") %></h1><br />
            <asp:Label ID="ActivityDescription" runat="server" Text='<%#Eval("Description") %>' />
            </div>
        <div class="center">
            <asp:ImageButton ID="Enter" runat="server" ImageUrl="Images/Enter.jpg" 
                ToolTip="马上报名"  Visible="false" CommandArgument='<%#Eval("Id") %>' CommandName="Enter"  />
        </div>
        <div>
        <h2>已报名列表</h2>
        <asp:DataList RepeatColumns="3" RepeatLayout="Table" ID="EnterUsers" runat="server" Width="100%">
            <ItemTemplate>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td align="center">
                            <asp:Image runat="server" ImageUrl='<%#Eval("Face") %>' ToolTip='<%#Eval("UserName") %>' />
                        </td>
                    </tr><tr>
                        <td align="center">
                            <%#Eval("UserName") %>
                            <%#(bool)Eval("IsEnter") ? "" :"(有事来不了)" %>
                            <%#(bool)Eval("SignIn") ? "(已签到)" : ""%>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
        </div>
        <br />
        <div class="center"><asp:ImageButton ID="NotEnter" runat="server"  ImageUrl="Images/NotEnter.jpg"  ToolTip="有事儿去不了" Visible="false" 
                CommandArgument='<%#Eval("Id") %>' CommandName="NotEnter" /></div>
        </td>
        </ItemTemplate>
    </asp:Repeater>
    </form>
    <script type="text/javascript">
        $(function () {
            $("img[src='']").attr('src','Images/NoFace.gif');
        });
    </script>
</body>
</html>
